﻿using Md.Api.Entity.DapperModels.MdDB;
using Md.Api.Model.Manage.SysDictType.Request;
using Md.Dapper.Repositories.Md;

namespace Md.Api.Service.Manage.SysDictType;
/// <summary>
/// 获取系统字典类型列表服务
/// </summary>
public class GetSysDictTypeListService : ApiBase<RequestGetSysDictTypeListModel>
{
    /// <summary>
    /// 系统字典类型仓储
    /// </summary>
    public SysDictTypeRep sysDictTypeRep { get; set; }
    /// <summary>
    /// 执行
    /// </summary>
    protected override void ExecuteMethod()
    {
        var model = new SysDictTypeModel();

        model.DictName = Parameter.DictName;
        model.DictType = Parameter.DictType;
        model.Status = Parameter.Status;
        model.CreateBy = Parameter.CreateBy;
        model.UpdateBy = Parameter.UpdateBy;

        var res = sysDictTypeRep.GetSysDictTypeList(model, Parameter.OrderBy, Parameter.IsDesc);

        Result.Data = res;
    }
}
